Collection
A generic collection of elements. Methods in this interface support only read-only access to the collection; read/write access is supported through the MutableCollection interface.
Parameters
the type of elements contained in the collection. The collection is covariant in its element type.
Functions
Checks if the specified element is contained in this collection.
Checks if all elements in the specified collection are contained in this collection.
Properties
Inheritors
Extensions
Checks if all elements in the specified collection are contained in this collection.
Returns true
if the collection is not empty.
Returns true
if this nullable collection is either null or empty.
Returns this Collection if it's not null
and the empty list otherwise.
Returns a list containing all elements of the original collection and then the given element.
Returns a list containing all elements of the original collection and then all elements of the given elements array.
Returns a list containing all elements of the original collection and then all elements of the given elements collection.
Returns a list containing all elements of the original collection and then all elements of the given elements sequence.
Returns a list containing all elements of the original collection and then the given element.
Returns a random element from this collection, or null
if this collection is empty.
Returns a random element from this collection using the specified source of randomness, or null
if this collection is empty.
Returns an array of Boolean containing all of the elements of this collection.
Returns an array of Byte containing all of the elements of this collection.
Returns an array of Char containing all of the elements of this collection.
Returns an array of Double containing all of the elements of this collection.
Returns an array of Float containing all of the elements of this collection.
Returns an array of Int containing all of the elements of this collection.
Returns an array of Long containing all of the elements of this collection.
Returns a new MutableList filled with all elements of this collection.
Returns an array of Short containing all of the elements of this collection.
Returns a typed array containing all of the elements of this collection.
Returns a typed array containing all of the elements of this collection.
Returns an array of UByte containing all of the elements of this collection.
Returns an array of UInt containing all of the elements of this collection.
Returns an array of ULong containing all of the elements of this collection.
Returns an array of UShort containing all of the elements of this collection.